package com.mhuang.module.common.intercept;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView;

import com.mhuang.module.common.controller.BaseController;

/**
 * 
 * @Package: com.mhuang.module.common.intercept
 * @Description 拦截器、可根据自己的业务进行处理
 * @author huang.miao
 * @date 2017年2月8日 下午4:43:54  
 * @since 1.0.0
 * @group skiper-opensource
 */
@Component 
public class UserIntercept extends BaseController implements HandlerInterceptor{

	private Logger logger = LoggerFactory.getLogger(getClass());
	
	public boolean preHandle(HttpServletRequest request,
            HttpServletResponse response, Object handler) throws Exception {
		Boolean result = true;
        // 没有注解通过拦截
        return result;
    }
	@Override
	public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,
			ModelAndView modelAndView) throws Exception {
	}
	
	@Override
	public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)
			throws Exception {
	}
}
